@echo off 

set path_projects=C:\developer\jboss-4.0.1sp1\server\default\deploy\cfusion.war\projects\
set path_cf=C:\CFusion\BIN\
set path_tmp=C:\temp\

set myapp=appGenerator

cd %path_projects%

:: COPY FILES OVER TO TEMP DIRECTORY
echo %path_tmp%
xcopy "%path_projects%..\parkapps\parkapps.com\%myapp%" "%path_tmp%%myapp%" /E /Q /Y /I /exclude:%path_projects%xcopy_exclude_list.txt

:: change path to where cfencode is defined
cd %path_cf%

:: ENCRYPT FILES IN TEMP DIRECTORY
echo encoding %path_tmp%
cfencode "%path_tmp%%myapp%\*.cfm" /r /q /h "For Ivy Chen only. DO NOT DISTRIBUTE. Copyright 2007 Jin Park" /v "2"

if errorlevel 4 goto lowmemory 
if errorlevel 2 goto abort 
if errorlevel 0 goto exit 

:: lowmemory 
echo Insufficient memory to copy files or 
echo invalid drive or command-line syntax. 
goto exit 

:: abort 
echo You pressed CTRL+C to end the copy operation. 
goto exit 

:: exit
